<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    <script src="../plugins/vue/vue.min.js"></script>
    <div id="app">

        <my-component>
            <h1>Hello Vue.js!</h1>
        </my-component>

        <my-component>
        </my-component>
    </div>
    <template id="myComponent">
        <div class="content">
            <h2>This is a component!</h2>
            <slot>如果没有分发内容，则显示slot中的内容</slot>
            <p>Say something...</p>
        </div>
    </template>

    <script>
        Vue.component('my-component', {
            template: '#myComponent'
        })

        new Vue({
            el: '#app'
        })
    </script>




</body>

</html>